﻿using System.IO;
using System.Windows;

namespace Script_Text_Editor_WPF_Edition
{
    /// <summary>
    /// App.xaml 的交互逻辑
    /// </summary>
    public partial class App : Application
    {
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            string configFileName = System.Windows.Forms.Application.ExecutablePath + ".config";
            if (!File.Exists(configFileName))
            {
                StreamWriter bw = new StreamWriter(new FileStream(configFileName, FileMode.Create), System.Text.Encoding.UTF8);
                bw.Write(Script_Text_Editor_WPF_Edition.Properties.Resources.app_config);
                bw.Close();
            }
        }
    }
}